3.464 \(\int (a+b (c \sec (e+f x))^n)^p \tan ^3(e+f x) \, dx\)

Optimal. Leaf size=143 \[ \frac{\sec ^2(e+f x) \left (a+b (c \sec (e+f x))^n\right )^p \left (\frac{b (c \sec (e+f x))^n}{a}+1\right )^{-p} \text{Hypergeometric2F1}\left (\frac{2}{n},-p,\frac{n+2}{n},-\frac{b (c \sec (e+f x))^n}{a}\right )}{2 f}+\frac{\left (a+b (c \sec (e+f x))^n\right )^{p+1} \text{Hypergeometric2F1}\left (1,p+1,p+2,\frac{b (c \sec (e+f x))^n}{a}+1\right )}{a f n (p+1)} \]

[Out]

(Hypergeometric2F1[1, 1 + p, 2 + p, 1 + (b*(c*Sec[e + f*x])^n)/a]*(a + b*(c*Sec[e + f*x])^n)^(1 + p))/(a*f*n*(
1 + p)) + (Hypergeometric2F1[2/n, -p, (2 + n)/n, -((b*(c*Sec[e + f*x])^n)/a)]*Sec[e + f*x]^2*(a + b*(c*Sec[e +
 f*x])^n)^p)/(2*f*(1 + (b*(c*Sec[e + f*x])^n)/a)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.293915, antiderivative size = 143, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 8, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.32, Rules used = {4139, 6742, 367, 12, 266, 65, 365, 364} \[ \frac{\sec ^2(e+f x) \left (a+b (c \sec (e+f x))^n\right )^p \left (\frac{b (c \sec (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac{2}{n},-p;\frac{n+2}{n};-\frac{b (c \sec (e+f x))^n}{a}\right )}{2 f}+\frac{\left (a+b (c \sec (e+f x))^n\right )^{p+1} \, _2F_1\left (1,p+1;p+2;\frac{b (c \sec (e+f x))^n}{a}+1\right )}{a f n (p+1)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*(c*Sec[e + f*x])^n)^p*Tan[e + f*x]^3,x]

[Out]

(Hypergeometric2F1[1, 1 + p, 2 + p, 1 + (b*(c*Sec[e + f*x])^n)/a]*(a + b*(c*Sec[e + f*x])^n)^(1 + p))/(a*f*n*(
1 + p)) + (Hypergeometric2F1[2/n, -p, (2 + n)/n, -((b*(c*Sec[e + f*x])^n)/a)]*Sec[e + f*x]^2*(a + b*(c*Sec[e +
 f*x])^n)^p)/(2*f*(1 + (b*(c*Sec[e + f*x])^n)/a)^p)

Rule 4139

Int[((a_) + (b_.)*((c_.)*sec[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With
[{ff = FreeFactors[Sec[e + f*x], x]}, Dist[1/f, Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a + b*(c*ff*x)^n)^p)/x
, x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[(m - 1)/2] && (GtQ[m, 0] || EqQ[
n, 2] || EqQ[n, 4] || IGtQ[p, 0] || IntegersQ[2*n, p])

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 367

Int[((d_.)*(x_))^(m_.)*((a_) + (b_.)*((c_)*(x_))^(n_))^(p_.), x_Symbol] :> Dist[1/c, Subst[Int[((d*x)/c)^m*(a
+ b*x^n)^p, x], x, c*x], x] /; FreeQ[{a, b, c, d, m, n, p}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rule 365

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^FracPart[p])
/(1 + (b*x^n)/a)^FracPart[p], Int[(c*x)^m*(1 + (b*x^n)/a)^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[
p, 0] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \left (a+b (c \sec (e+f x))^n\right )^p \tan ^3(e+f x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (-1+x^2\right ) \left (a+b (c x)^n\right )^p}{x} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{\left (a+b (c x)^n\right )^p}{x}+x \left (a+b (c x)^n\right )^p\right ) \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{\left (a+b (c x)^n\right )^p}{x} \, dx,x,\sec (e+f x)\right )}{f}+\frac{\operatorname{Subst}\left (\int x \left (a+b (c x)^n\right )^p \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{c \left (a+b x^n\right )^p}{x} \, dx,x,c \sec (e+f x)\right )}{c f}+\frac{\operatorname{Subst}\left (\int \frac{x \left (a+b x^n\right )^p}{c} \, dx,x,c \sec (e+f x)\right )}{c f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{\left (a+b x^n\right )^p}{x} \, dx,x,c \sec (e+f x)\right )}{f}+\frac{\operatorname{Subst}\left (\int x \left (a+b x^n\right )^p \, dx,x,c \sec (e+f x)\right )}{c^2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{(a+b x)^p}{x} \, dx,x,(c \sec (e+f x))^n\right )}{f n}+\frac{\left (\left (a+b (c \sec (e+f x))^n\right )^p \left (1+\frac{b (c \sec (e+f x))^n}{a}\right )^{-p}\right ) \operatorname{Subst}\left (\int x \left (1+\frac{b x^n}{a}\right )^p \, dx,x,c \sec (e+f x)\right )}{c^2 f}\\ &=\frac{\, _2F_1\left (1,1+p;2+p;1+\frac{b (c \sec (e+f x))^n}{a}\right ) \left (a+b (c \sec (e+f x))^n\right )^{1+p}}{a f n (1+p)}+\frac{\, _2F_1\left (\frac{2}{n},-p;\frac{2+n}{n};-\frac{b (c \sec (e+f x))^n}{a}\right ) \sec ^2(e+f x) \left (a+b (c \sec (e+f x))^n\right )^p \left (1+\frac{b (c \sec (e+f x))^n}{a}\right )^{-p}}{2 f}\\ \end{align*}

Mathematica [A]  time = 4.12472, size = 171, normalized size = 1.2 \[ \frac{\left (a+b (c \sec (e+f x))^n\right )^p \left (\sec ^2(e+f x) \left (\frac{b \left (c \sqrt{\sec ^2(e+f x)}\right )^n}{a}+1\right )^{-p} \text{Hypergeometric2F1}\left (\frac{2}{n},-p,\frac{n+2}{n},-\frac{b \left (c \sqrt{\sec ^2(e+f x)}\right )^n}{a}\right )-\frac{2 \left (\frac{a \left (c \sqrt{\sec ^2(e+f x)}\right )^{-n}}{b}+1\right )^{-p} \text{Hypergeometric2F1}\left (-p,-p,1-p,-\frac{a \left (c \sqrt{\sec ^2(e+f x)}\right )^{-n}}{b}\right )}{n p}\right )}{2 f} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*(c*Sec[e + f*x])^n)^p*Tan[e + f*x]^3,x]

[Out]

((a + b*(c*Sec[e + f*x])^n)^p*((-2*Hypergeometric2F1[-p, -p, 1 - p, -(a/(b*(c*Sqrt[Sec[e + f*x]^2])^n))])/(n*p
*(1 + a/(b*(c*Sqrt[Sec[e + f*x]^2])^n))^p) + (Hypergeometric2F1[2/n, -p, (2 + n)/n, -((b*(c*Sqrt[Sec[e + f*x]^
2])^n)/a)]*Sec[e + f*x]^2)/(1 + (b*(c*Sqrt[Sec[e + f*x]^2])^n)/a)^p))/(2*f)

________________________________________________________________________________________

Maple [F]  time = 0.546, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b \left ( c\sec \left ( fx+e \right ) \right ) ^{n} \right ) ^{p} \left ( \tan \left ( fx+e \right ) \right ) ^{3}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*(c*sec(f*x+e))^n)^p*tan(f*x+e)^3,x)

[Out]

int((a+b*(c*sec(f*x+e))^n)^p*tan(f*x+e)^3,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (\left (c \sec \left (f x + e\right )\right )^{n} b + a\right )}^{p} \tan \left (f x + e\right )^{3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(c*sec(f*x+e))^n)^p*tan(f*x+e)^3,x, algorithm="maxima")

[Out]

integrate(((c*sec(f*x + e))^n*b + a)^p*tan(f*x + e)^3, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (\left (c \sec \left (f x + e\right )\right )^{n} b + a\right )}^{p} \tan \left (f x + e\right )^{3}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(c*sec(f*x+e))^n)^p*tan(f*x+e)^3,x, algorithm="fricas")

[Out]

integral(((c*sec(f*x + e))^n*b + a)^p*tan(f*x + e)^3, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(c*sec(f*x+e))**n)**p*tan(f*x+e)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (\left (c \sec \left (f x + e\right )\right )^{n} b + a\right )}^{p} \tan \left (f x + e\right )^{3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(c*sec(f*x+e))^n)^p*tan(f*x+e)^3,x, algorithm="giac")

[Out]

integrate(((c*sec(f*x + e))^n*b + a)^p*tan(f*x + e)^3, x)